/**
 * ReportGear(2011)
 */
package com.reportgear.report.model.cell.value;

import org.dom4j.Element;

/**
 * 明细主对象<br/>
 * SalaryDetailObject扩展而来
 * 
 * @version 1.0 2011-6-6
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class MainDetailObject extends AbstractCellObject {
	// 显示值
	private final String value;
	// 明细Id
	private final int id;

	public MainDetailObject(int id, String value) {
		this.id = id;
		this.value = value;
	}

	@Override
	public String toString() {
		return this.value;
	}

	/**
	 * 获取Id
	 * 
	 * @return Id
	 */
	public int getId() {
		return id;
	}

	/**
	 * 获取显示值
	 * 
	 * @return 显示值
	 */
	public String getValue() {
		return value;
	}

	@Override
	public void read(Element parent) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void write(Element parent) {
		throw new UnsupportedOperationException();
	}
}
